/**
 * 
 */
package com.epart.widget;

import com.epart.widget.module.component.WcmsWidget;
import com.epart.widget.module.component.WcmsWidgetLogin;
import com.epart.widget.module.component.WcmsWidgetMenuBar;
import com.epart.widget.support.DaoFactory;
import com.epart.widget.support.ServiceFactory;

/**
 * main메서드를 가지고 있는 실행 클래스
 * 
 * @author cwsong
 * @version 2011. 3. 10.
 */
public class Main {

	/**
	 * 실행한다.
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		
		//팩토리생성
		DaoFactory daoFactory = new DaoFactory();
		ServiceFactory serviceFactory = new ServiceFactory(daoFactory);
		
		//위젯생성
		WcmsWidget wcmsWidget = new WcmsWidget();
		
		//의존관계 주입
		wcmsWidget.setWcmsWidgetService(serviceFactory.getWcmsWidgetService());
		wcmsWidget.setLoginService(serviceFactory.getLoginService());
		wcmsWidget.setBoardService(serviceFactory.getBoardService());
		
		//컴포넌트생성
		wcmsWidget.setWcmsWidgetMenuBar(new WcmsWidgetMenuBar());
		wcmsWidget.setWcmsWidgetLogin(new WcmsWidgetLogin());
		
		//스타트
		wcmsWidget.start();
	}
}
